package com.hqyj.controller;


import com.hqyj.pojo.TbCommunity;
import com.hqyj.service.TbCommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 小区表 前端控制器
 * </p>
 *
 * @author gp
 * @since 2021-09-25
 */
@RestController
@RequestMapping("/tb-community")
public class TbCommunityController {

    @Autowired
    TbCommunityService tbCommunityService;

    /**
     * 127.0.0.1:8080/tb-community/getCWithB ---- get
     */
    @GetMapping("/getCWithB")
    public List<TbCommunity> getCommunityWithBuild(){
        return tbCommunityService.getCommunityWithBuild();
    }

    /**
     * 127.0.0.1:8080/tb-community/communities ---- get
     */
    @GetMapping("/communities")
    public List<TbCommunity> getCommunities(){
        return tbCommunityService.getCommunities();
    }
}

